  <div class="site-showcase">
    <!-- Start Page Header -->
    <div class="parallax page-header" style="background-image:url(http://placehold.it/1200x260&amp;text=Blog);">
          <div class="container">
              <div class="row">
                  <div class="col-md-12">
                      <h1><?php echo __('Blog') ?></h1>
                  </div>
             </div>
         </div>
    </div>
    <!-- End Page Header -->
  </div> 
  <!-- Start Content -->
  <div class="main" role="main">
    <div id="content" class="content full">
      <div class="container">
        <div class="row">
          <div class="col-md-9 posts-archive">
  <?php if (!empty($blogPosts)) : ?>

    <?php foreach ($blogPosts as $blogPost) : ?>
            <article class="post">
              <div class="row">
                <div class="col-md-4 col-sm-4"> <a href="<?php echo $this->Html->url(array('action' => 'view', 'slug' => $blogPost['BlogPost']['slug']), array('title' => $blogPost['BlogPost']['title'], 'rel' => 'bookmark')); ?>"><?php 
				if($blogPost['BlogPost']['image1'])
				echo $this->Html->image('/files/blog/thumb/'.$blogPost['BlogPost']['image1'],array('class'=>'img-thumbnail'));
				else
				echo '<img src="http://placehold.it/600x400&amp;text=No Image Found" alt="" class="img-thumbnail">';
				 ?></a> </div>
                <div class="col-md-8 col-sm-8">
                  <h3><?php 

				  $title	=	$this->Text->truncate($blogPost['BlogPost']['title'],50);
				  echo $this->Html->link($title, array('action' => 'view', 'slug' => $blogPost['BlogPost']['slug']), array('title' => $blogPost['BlogPost']['title'], 'rel' => 'bookmark')); ?></h3><?php //echo date('c', $createdTimestamp = strtotime($blogPost['BlogPost']['created'])); ?>
                  <span class="post-meta meta-data"> <span><i class="fa fa-calendar"></i>
				  <?php echo $this->Time->format($blogPost['BlogPost']['created'], '%b %e, %Y'); //  echo date($blogSettings['published_format_on_post_index'], $createdTimestamp); ?></span>
                                <?php if ($this->Blog->filtered()) : ?>

                  <span><i class="fa fa-archive"></i> 
				 
    Showing posts <?php echo $this->Blog->filterDescription(); ?>, <?php echo $this->Html->link(__('Show all', true), array('action' => 'index')); ?>
</span> <?php endif; ?> </span> 

                  <p> <?php echo $this->Text->truncate($blogPost['BlogPost']['body'],220); ?></p>
                  <p><a href="<?php echo $this->Html->url(array('action' => 'view', 'slug' => $blogPost['BlogPost']['slug']), array('title' => $blogPost['BlogPost']['title'], 'rel' => 'bookmark')); ?>" class="btn btn-primary btn-sm">Continue reading <i class="fa fa-long-arrow-right"></i></a></p>
                </div>
              </div>
            </article>
    <?php endforeach; ?>
    <?php endif; ?>
    

			<?php  echo $this->element('paginate'); ?>

          </div>
          <!-- Start Sidebar -->
          		  <?php  echo $this->element('bolg-side-bar'); ?>

        </div>
      </div>
    </div>
  </div>
